Skip to content

feat(LibCarla/ros2): [7/7] remove legacy FastDDS-generated type files - #9645

Merged
LuisPovedaCano merged 3 commits into
carla-simulator:ue4-devfrom
JArmandoAnaya:feature/ros2-remove-fastdds-generated-types
Apr 10, 2026
Merged

feat(LibCarla/ros2): [7/7] remove legacy FastDDS-generated type files#9645
LuisPovedaCano merged 3 commits into
carla-simulator:ue4-devfrom
JArmandoAnaya:feature/ros2-remove-fastdds-generated-types

Conversation

@JArmandoAnaya

@JArmandoAnaya JArmandoAnaya commented Apr 5, 2026

Copy link
Copy Markdown
Contributor

Description

Part of the DDS middleware decoupling series (issue #9294). Blocked on #9644.

Removes 125 legacy FastDDS-generated type files from
LibCarla/source/carla/ros2/types/:

  • 31 type definition pairs ({TypeName}.h + {TypeName}.cpp)
  • 31 PubSubType pairs ({TypeName}PubSubTypes.h + {TypeName}PubSubTypes.cpp)
  • FastDDSConversions.h

These files were auto-generated by fastddsgen from IDL definitions and are
no longer referenced anywhere in the codebase. GenericCdrPubSubType<T>
(introduced in #9643) replaces all 31 hand-generated *PubSubType classes
using CdrSerialization.h for direct CDR serialization of
carla::ros2::msg::* POD structs.

Both cmake/fast_dds/CMakeLists.txt and cmake/cyclone_dds/CMakeLists.txt
collect type files via file(GLOB) patterns (types/*.h, types/*.cpp),
so no CMake changes are needed. The globs self-adjust on the next configure pass.

After this PR, LibCarla/source/carla/ros2/types/ contains only:

  • CdrSerialization.h
  • CdrTopicInfo.h
  • msg/ (31 vendor-agnostic POD struct headers)

PR series

This PR is part of the DDS middleware decoupling series (#9294). Each PR in the chain inherits the commits of all prior PRs. The Commits column lists only the commits introduced by that PR, and the Files column counts only the files changed by those new commits.

# PR Title Branch Commits Files
1/7 #9608 DDS middleware abstraction layer feature/dds-middleware-abstraction-layer 0ab35ee6 10
2/7 #9612 POD message types, FastDDS conversions, and TypeMap specializations feature/ros2-pod-types-and-fastdds-conversions e665d2af 39
3/7 #9619 Migrate publishers and subscribers to POD message types feature/ros2-publishers-pod-types-migration 98b6f7aa 27
4/7 #9620 CycloneDDS enum, factory, stubs, and tests feature/ros2-cyclonedds-enum-factory 2a4a8db3 5
5/7 #9643 Unified CDR serialization + GenericCdrPubSubType feature/ros2-cdr-serialization 5a9dd3b4, 0a9ca585 8
6/7 #9644 CycloneDDS CDR middleware, UE4 runtime selection, and correctness fixes feature/ros2-cyclonedds-cdr-middleware d3f2a45b, 2d80046b 26
7/7 #9645 Remove legacy FastDDS-generated type files (this PR) feature/ros2-remove-fastdds-generated-types eea4e0a4 125

Fixes #9294

Where has this been tested?

  • Platform(s): Linux Ubuntu 22.04
  • Python version(s): 3.12
  • Unreal Engine version(s): UE4

Possible Drawbacks

None. All deleted files were dead code with no remaining references.


This change is Reviewable

@update-docs

update-docs Bot commented Apr 5, 2026

Copy link
Copy Markdown

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update our CHANGELOG.md based on your changes.

Delete 125 auto-generated FastDDS type files from
LibCarla/source/carla/ros2/types/: 31 type-definition pairs
({TypeName}.h + {TypeName}.cpp), 31 PubSubType pairs
({TypeName}PubSubTypes.h + {TypeName}PubSubTypes.cpp), and
FastDDSConversions.h.

These files were generated by fastddsgen from IDL definitions and are no
longer referenced anywhere in the codebase. GenericCdrPubSubType<T>
(introduced in carla-simulator#9643) replaces all 31 hand-generated PubSubType classes by
serializing carla::ros2::msg::* POD structs directly to CDR bytes via
CdrSerialization.h, with no dependency on these files.

Both cmake/fast_dds/CMakeLists.txt and cmake/cyclone_dds/CMakeLists.txt
collect type files via file(GLOB) patterns (types/*.h, types/*.cpp), so no
CMake changes are needed. The globs self-adjust on the next configure pass.

After this change, LibCarla/source/carla/ros2/types/ contains only:
CdrSerialization.h, CdrTopicInfo.h, and msg/ (31 POD struct headers).

Tests: 120/120 server + 56/56 client + 2/2 smoke.
@JArmandoAnaya
JArmandoAnaya force-pushed the feature/ros2-remove-fastdds-generated-types branch from e32d7bc to 21a32d6 Compare April 9, 2026 15:34
@JArmandoAnaya

Copy link
Copy Markdown
Contributor Author

Hello @LuisPovedaCano, this PR includes changes in 125 files. I hope this won't be a problem, since this PR is only to perform cleanup: no new files or changes are introduced; only unused files related to the old FastDDS API that is no longer used are removed.

@LuisPovedaCano

Copy link
Copy Markdown
Contributor

Yes, in this case, there is no problem

@LuisPovedaCano LuisPovedaCano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FastDDSTypeMap.h was replaced by GenericCdrPubSubType.h and is no longer included anywhere. It still references the deleted PubSubTypes.h and FastDDSConversions.h headers, but since it's never compiled it doesn't break the build.
It should be deleted along with the rest of the legacy files.

@JArmandoAnaya

Copy link
Copy Markdown
Contributor Author

Good catch! Let me take a look and see if I'm missing something else.

FastDDSTypeMap.h was replaced by GenericCdrPubSubType.h (introduced in
carla-simulator#9643) and is no longer included anywhere in the codebase. It references
31 deleted PubSubTypes.h headers and the deleted FastDDSConversions.h,
making it dead code that would cause a build error if ever included.

This completes the cleanup started in the previous commit (125 files
deleted from types/). Total legacy FastDDS files removed: 126.
@JArmandoAnaya

Copy link
Copy Markdown
Contributor Author

All right, I removed that file, and I didn't find any other missing files to clean up.

@LuisPovedaCano LuisPovedaCano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your hard work and patience.
Everything is fine.

@JArmandoAnaya

Copy link
Copy Markdown
Contributor Author

Thank you for reviewing and accepting my proposal. I really hope this can help improve Carla's integration into more robotics projects.

@JArmandoAnaya

JArmandoAnaya commented Apr 10, 2026

Copy link
Copy Markdown
Contributor Author

@LuisPovedaCano, please check this other PR #9666 before merging this one. It's related to the Windows CI/CD failing.

@LuisPovedaCano
LuisPovedaCano merged commit ff5e490 into carla-simulator:ue4-dev Apr 10, 2026
1 of 2 checks passed
@youtalk

youtalk commented May 15, 2026

Copy link
Copy Markdown
Contributor

@JArmandoAnaya Would it be possible to port these wonderful features to the uv5-dev branch? I would be very grateful if that is possible. However, if it's not feasible, I'll handle it on my end.

@JArmandoAnaya

JArmandoAnaya commented May 15, 2026

Copy link
Copy Markdown
Contributor Author

Hello @youtalk 👋! Yes, actually, I plan to start working on that porting soon. Maybe next week I will take some time to start seeing how to do it. I wanted to close the gap between the two branches a bit more before. But maybe it is close enough, and I also wanted to implement the UE5-dev performance improvements that are close to being done.

@youtalk

youtalk commented May 15, 2026

Copy link
Copy Markdown
Contributor

@JArmandoAnaya Thank you so much! I would like to support you again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants